"""
客户关怀页面
"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage
class CustomerCarePage(BasePage):
    #定位器
    #新建关怀
    kh_khgh_xjgh_locator = (By.CSS_SELECTOR, "body > div.container > div.row > div:nth-child(1) > div > a")
    #编辑
    kh_khgh_bj_locator = (By.LINK_TEXT, "编辑")
    #关怀列表
    kh_khgh_ghlb_locator = (By.CSS_SELECTOR,"#form1 > table > tbody")

    #点击新建关怀
    def click_xjgh(self):
        self.driver.find_element(*self.kh_khgh_xjgh_locator).click()
    #点击编辑
    def click_bj(self):
        self.driver.find_element(*self.kh_khgh_bj_locator).click()

    #选择关怀列表
    def get_table_element(self):
        return self.driver.find_element(*self.kh_khgh_ghlb_locator)